<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core">


    <ui:composition template="/WEB-INF/faces/template.xhtml">

        <!-- new title -->
        <ui:define name="title">
            <h:outputText value="Sunshine Hotel" />
        </ui:define>

        <!-- new content -->
        <ui:define name="content">

            <!-- Check login -->
            <ui:include src="/resources/include/checkLogin.xhtml" />

            <h1>
                Booking confirmation
            </h1>

            <c:if test="${param.error == 'mail'}">
                <p>
                    The confirmation e-mail wasn't sent.
                </p>
            </c:if>
            <c:if test="${param.error == 'card'}">
                <p>
                    Your credit card isn't valid. <h:link outcome="pickRoom.xhtml" value="Go back" /> and try again. 
                </p>
            </c:if>
            <c:otherwise>
                <p>
                    Thank you! An e-mail has been sent to you.
                </p>
            </c:otherwise>

            <h1>
                OR
                <br />
                <br />
                Booking confirmation
            </h1>

            <p>
                Something went wrong, please go back and check your credit card number.
            </p>


        </ui:define>

    </ui:composition>
</html>